Optimal. Leaf size=19 \[ \frac {\tan ^2(x)}{2}-\frac {1}{3} i \tan ^3(x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {3597, 862, 45}
\begin {gather*} \frac {\tan ^2(x)}{2}-\frac {1}{3} i \tan ^3(x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 862
Rule 3597
Rubi steps
\begin {align*} \int \frac {\sec ^4(x)}{i+\cot (x)} \, dx &=-\text {Subst}\left (\int \frac {1+x^2}{x^4 (i+x)} \, dx,x,\cot (x)\right )\\ &=-\text {Subst}\left (\int \frac {-i+x}{x^4} \, dx,x,\cot (x)\right )\\ &=-\text {Subst}\left (\int \left (-\frac {i}{x^4}+\frac {1}{x^3}\right ) \, dx,x,\cot (x)\right )\\ &=\frac {\tan ^2(x)}{2}-\frac {1}{3} i \tan ^3(x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 24, normalized size = 1.26 \begin {gather*} \frac {1}{6} \left (\sec ^2(x) (3-2 i \tan (x))+2 i \tan (x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.20, size = 18, normalized size = 0.95
method | result | size |
default | \(-i \left (\frac {\left (\tan ^{3}\left (x \right )\right )}{3}+\frac {i \left (\tan ^{2}\left (x \right )\right )}{2}\right )\) | \(18\) |
risch | \(\frac {2 \,{\mathrm e}^{2 i x}-\frac {2}{3}}{\left ({\mathrm e}^{2 i x}+1\right )^{3}}\) | \(21\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 13, normalized size = 0.68 \begin {gather*} -\frac {1}{3} i \, \tan \left (x\right )^{3} + \frac {1}{2} \, \tan \left (x\right )^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 30 vs. \(2 (13) = 26\).
time = 2.98, size = 30, normalized size = 1.58 \begin {gather*} \frac {2 \, {\left (3 \, e^{\left (2 i \, x\right )} - 1\right )}}{3 \, {\left (e^{\left (6 i \, x\right )} + 3 \, e^{\left (4 i \, x\right )} + 3 \, e^{\left (2 i \, x\right )} + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec ^{4}{\left (x \right )}}{\cot {\left (x \right )} + i}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 13, normalized size = 0.68 \begin {gather*} -\frac {1}{3} i \, \tan \left (x\right )^{3} + \frac {1}{2} \, \tan \left (x\right )^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.20, size = 13, normalized size = 0.68 \begin {gather*} -\frac {{\mathrm {tan}\left (x\right )}^2\,\left (-3+\mathrm {tan}\left (x\right )\,2{}\mathrm {i}\right )}{6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________